<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <title>购物车</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/css/see/reset.min.css">
    <!--<link rel="stylesheet" href="/plugins/swiper/swiper4.2.min.css">-->
    <link rel="stylesheet" href="/css/purchase/shoppingCart.min.css?v=<%=$version%>">
</head>
<body>
<div id="shoppingCart" v-cloak>
    <header class="discount-header">
        <span class="goback" @click="getBack()"></span>
        购物车
        <strong class="header-right1" @click="getEdit()" v-if="type==1">完成</strong>
        <strong class="header-right" @click="getEdit(1)" v-else>编辑</strong>
    </header>
    <div class="shoppingCart">
        <template v-for="(item,index) in cartList">
            <div class="shoppingCart-list" :class="{'shoppingCart-list1':item.mediaUserId==0}">
                <div class="shoppingCart-listTitle" :id="'listTitle'+index" @click.stop="checkedAll(index)">
                    <template v-if="item.mediaUserId==0">
                        <span>{{item.name}}</span>
                    </template>
                    <template v-else>
                        <strong :style="bgimg(item.headImg)"></strong>{{item.name}}
                    </template>
                </div>
                <div class="shoppingCart-listCent">
                    <div class="list-cent" v-for="(list,ins) in item.products" :class="getClass(list,ins)">
                        <div class="list-centLeft">
                            <template v-if="list.activityType!=null&&list.limitTime!=null&&compareDate(list)<0">
                                <input type="checkbox" :id="'checkbox'+index+ins" disabled="disabled" :value="list.cartId" class="shoppingCart-input" :class="{'Cart-icon':ins==0||list.activityType}">
                                <label :for="'checkbox'+index+ins" class="addGoods-icon1" :class="{'Cart-icon':ins==0||list.activityType}"></label>
                            </template>
                            <template v-else>
                                <input type="checkbox" :id="'checkbox'+index+ins" :value="list.cartId" v-model="integralList" class="shoppingCart-input" :class="{'Cart-icon':ins==0||list.activityType}">
                                <label :for="'checkbox'+index+ins" class="shoppingCart-icon" :class="{'Cart-icon':ins==0||list.activityType}"></label>
                            </template>
                            <!--<label :for="'checkbox'+index+ins" class="shoppingCart-icon" :class="{'Cart-icon':ins==0||list.activityType}" @click="getCheck()"></label>-->
                            <div class="list-centRight clearfix">
                                <div class="centRight-img" :style="bgimg(list.imgSrc)" @click.stop="getNext(list)">
                                    <span class="shoppingCart-icon1" v-if="list.activityType==3"></span>
                                    <span class="shoppingCart-icon2" v-if="list.activityType==2"></span>
                                    <span class="shoppingCart-icon3" v-if="list.activityType==1"></span>
                                    <!--<template v-if="list.activityType!=null">-->
                                    <!---->
                                    <!--</template>-->
                                    <strong class="overtime" v-if="list.activityType!=null&&compareDate(list)<0"></strong>
                                </div>
                                <div class="centRight-cent">
                                    <h6 @click="getNext(list.productId)">{{list.title}}</h6>
                                    <p v-if="list.activityType==3">{{list.colorName}}<span></span>当前<strong>9.0</strong>折</p>
                                    <p v-else>{{list.colorName}}<i v-if="list.colorName">&nbsp;</i>{{list.specName}}</p>
                                    <div>应付:<span class="happyi-mon">&yen;{{list.integral*list.number}}</span></div>
                                </div>
                            </div>
                            <p class="centRight-describe" v-if="list.activityType==3">折扣商品请在当天22:00点前付款</p>
                            <p class="centRight-describe" v-if="list.activityType==2">秒杀商品请在1小时内完成付款</p>
                            <p class="centRight-describe" v-if="list.activityType==1">爆款商品请在1小时内完成付款</p>
                            <div class="list-centData" :class="{'list-centData1':list.activityType!=null&&compareDate(list)<0}">
                                <template v-if="list.activityType">
                                    <div class="centData-num clearfix">
                                        <span class="centData-reduce">－</span>
                                        <input type="number" name="num" :value="list.number">
                                        <span class="centData-add">＋</span>
                                    </div>
                                </template>
                                <template v-else>
                                    <div class="centData-num clearfix">
                                        <span class="centData-reduce" @click.stop="updateCart(2,list,index,ins)">－</span>
                                        <input type="number" name="" v-model.number="list.number">
                                        <span class="centData-add" @click.stop="updateCart(1,list,index,ins)">＋</span>
                                    </div>
                                </template>
                                <p v-if="list.activityType!=null&&compareDate(list)>0">剩余<span :id="'data'+index+ins" :data="compareDate(list)">{{leftTimer(list,index,ins)}}</span></p>
                            </div>
                        </div>
                        <div class="list-centClose" @click="deleteCartByid(list.cartId)">
                            <span>删除</span>
                        </div>

                    </div>
                </div>
            </div>
        </template>

    </div>
    <div class="shoppingCart-footer clearfix">
        <!--<input type="checkbox" id="checkboxCart">-->
        <label class="checkboxCart" @click="getCheckedAll()">全选
           <!-- (<strong v-text="integralList.length"></strong>)-->
        </label>
        <template v-if="type==1">
            <strong class="footer-btn1" @click="deleteCartByid()">删除</strong>
        </template>
        <template v-else>
            <strong class="footer-btn" @click="getPreorder()">结算</strong>
            <span v-if="totalMoney">&yen;{{totalMoney}}</span>
        </template>

    </div>
    <prompt-view ref="prompt"></prompt-view>
</div>
<script src='/plugins/js/jquery-1.11.3.min.js'></script>
<script type="text/javascript" src="/plugins/js/vue.min.js"></script>
<script type="text/javascript" src="/js/purchase/shoppingCart.js?v=<%=$version%>"></script>
<script>
</script>
</body>
</html>